#include <iostream>

#include "../common/Any.hpp"

class A
{
public:
    A()
    {
        std::cout << "A()" << std::endl;
    }

    A(const A& a){std::cout << "A(const A& a)" << std::endl;}

    ~A()
    {
        std::cout << "~A()" << std::endl;
    }
};

int main()
{
    Any any(10);
    int* a = any.get<int>();
    std::cout << *a << std::endl;

    Any any2 = any;
    std::cout << *(any2.get<int>()) << std::endl;

    Any any3 = 10;
    std::cout << *(any3.get<int>()) << std::endl;

    A ca;
    any3 = ca;

    any3 = 3.15;
    std::cout << *(any3.get<double>()) << std::endl;


    return 0;
}